package cn.wps.moffice.main.local.filebrowser;

import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

import android.util.SparseArray;
import cn.wps.moffice.OfficeApp;

public class BrowserConst {

	public static final int ALL_POSITION = 0;
	public static final int DOC_POSITION = 1;
	public static final int PPT_POSITION = 2;
	public static final int XSL_POSITION = 3;
	public static final int PDF_POSITION = 4;
	public static final int TXT_POSITION = 5;
	public static final int OTHER_POSITION = 6;
	
	public static SparseArray<Set<String>> getRegexs() {
		SparseArray<Set<String>> regexs = new SparseArray<Set<String>>();

		Set<String> doc = new HashSet<String>();
		List<String> docFileTypes = Arrays.asList(OfficeApp.getInstance().getDocFileType());
		doc.addAll(docFileTypes);
		regexs.put(DOC_POSITION, doc);

		Set<String> ppt = new HashSet<String>();
		List<String> pptFileTypes = Arrays.asList(OfficeApp.getInstance().getPptFileType());
		ppt.addAll(pptFileTypes);
		regexs.put(PPT_POSITION, ppt);

		Set<String> xsl = new HashSet<String>();
		List<String> xslFileTypes = Arrays.asList(OfficeApp.getInstance().getXslFileType());
		xsl.addAll(xslFileTypes);
		regexs.put(XSL_POSITION, xsl);

		Set<String> pdf = new HashSet<String>();
		List<String> pdfFileTypes = Arrays.asList(OfficeApp.getInstance().getPdfFileType());
		pdf.addAll(pdfFileTypes);
		regexs.put(PDF_POSITION, pdf);

		Set<String> txt = new HashSet<String>();
		List<String> txtFileTypes = Arrays.asList(OfficeApp.getInstance().getTxtFileType());
		txt.addAll(txtFileTypes);
		regexs.put(TXT_POSITION, txt);

		Set<String> other = new HashSet<String>();
		List<String> otherFileTypes = Arrays.asList(OfficeApp.getInstance().getOtherFileType());
		other.addAll(otherFileTypes);
		regexs.put(OTHER_POSITION, other);
		return regexs;
	}
	
}
